Next | Prev | Up | Top | Contents | Index

Removing Files in the Volume Header With dvhtool

Caution: The procedure in this section can result in the loss of data if it is not performed properly. It is recommended only for experienced IRIX system administrators. The procedure below can be used to remove logical volume labels (for example xlvlab) and files (for example sash) from the volume header of a disk. Before performing this procedure, review the discussion of dvhtool in the section "Volume Headers" in Chapter 1.

  1. Using hinv, determine the controller and drive addresses of the disk that has the volume header you want to change. In this procedure, the example commands and output assume that the disk is on controller 0, drive address 2. Substitute the controller and drive addresses of your disk.

  2. As superuser, invoke dvhtool with the raw device name of the volume header of the disk, for example:

    # dvhtool /dev/rdsk/dks0d2vh

    (See the section "Device Names" in Chapter 1 for information on constructing the device name.)

  3. Display the volume directory portion of the volume header by answering two prompts:
Command? (read, vd, pt, dp, write, bootfile, or quit): vd
(d FILE, a UNIX_FILE FILE, c UNIX_FILE FILE, g FILE UNIX_FILE or l)?
        l

Current contents:
        File name        Length     Block #
        sgilabel            512           2
        xlvlab            10752           3
        lvlab2              512          26

  1. Use the d command to delete the file you want to delete, for example xlvlab:
(d FILE, a UNIX_FILE FILE, c UNIX_FILE FILE, g FILE UNIX_FILE or l)?
        d xlvlab

  1. To delete additional files, continue to use the d command, for example:
(d FILE, a UNIX_FILE FILE, c UNIX_FILE FILE, g FILE UNIX_FILE or l)?
        d lvlab2

  1. List the volume directory again to confirm that the files are gone:
(d FILE, a UNIX_FILE FILE, c UNIX_FILE FILE, g FILE UNIX_FILE or l)?
        l

Current contents:
        File name        Length     Block #
        sgilabel            512           2

  1. Exit this "menu" and write the changes to the volume header:
(d FILE, a UNIX_FILE FILE, c UNIX_FILE FILE, g FILE UNIX_FILE or l)?
        q

Command? (read, vd, pt, dp, write, bootfile, or quit): write

  1. Quit dvhtool:
Command? (read, vd, pt, dp, write, bootfile, or quit): quit


Next | Prev | Up | Top | Contents | Index